﻿using System;

namespace Poly2Tri
{
	// Token: 0x020003E6 RID: 998
	public static class P2T
	{
		// Token: 0x06001B0F RID: 6927 RVA: 0x000AC1A0 File Offset: 0x000AA3A0
		public static void Triangulate(PolygonSet ps)
		{
			foreach (Polygon p in ps.Polygons)
			{
				P2T.Triangulate(p);
			}
		}

		// Token: 0x06001B10 RID: 6928 RVA: 0x000AC1F8 File Offset: 0x000AA3F8
		public static void Triangulate(Polygon p)
		{
			P2T.Triangulate(P2T._defaultAlgorithm, p);
		}

		// Token: 0x06001B11 RID: 6929 RVA: 0x000AC1F8 File Offset: 0x000AA3F8
		public static void Triangulate(ConstrainedPointSet cps)
		{
			P2T.Triangulate(P2T._defaultAlgorithm, cps);
		}

		// Token: 0x06001B12 RID: 6930 RVA: 0x000AC1F8 File Offset: 0x000AA3F8
		public static void Triangulate(PointSet ps)
		{
			P2T.Triangulate(P2T._defaultAlgorithm, ps);
		}

		// Token: 0x06001B13 RID: 6931 RVA: 0x000AC205 File Offset: 0x000AA405
		public static TriangulationContext CreateContext(TriangulationAlgorithm algorithm)
		{
			if (algorithm != TriangulationAlgorithm.DTSweep)
			{
			}
			return new DTSweepContext();
		}

		// Token: 0x06001B14 RID: 6932 RVA: 0x000AC218 File Offset: 0x000AA418
		public static void Triangulate(TriangulationAlgorithm algorithm, ITriangulatable t)
		{
			TriangulationContext triangulationContext = P2T.CreateContext(algorithm);
			triangulationContext.PrepareTriangulation(t);
			P2T.Triangulate(triangulationContext);
		}

		// Token: 0x06001B15 RID: 6933 RVA: 0x000AC23C File Offset: 0x000AA43C
		public static void Triangulate(TriangulationContext tcx)
		{
			TriangulationAlgorithm algorithm = tcx.Algorithm;
			if (algorithm != TriangulationAlgorithm.DTSweep)
			{
			}
			DTSweep.Triangulate((DTSweepContext)tcx);
		}

		// Token: 0x06001B16 RID: 6934 RVA: 0x00002973 File Offset: 0x00000B73
		public static void Warmup()
		{
		}

		// Token: 0x04001D3A RID: 7482
		private static TriangulationAlgorithm _defaultAlgorithm;
	}
}
